package io;

import java.io.*;

public class Test7 {
    public static void main(String[] args) {
        File file = new File("./JST2208/src/map");
        File[] files = file.listFiles(f->f.getName().endsWith(".java"));
        for(File f : files){
//            System.out.println(f.getName());
            try {
                FileInputStream fis = new FileInputStream(f);
                InputStreamReader isr = new InputStreamReader(fis);
                BufferedReader br = new BufferedReader(isr);
                String line;
                while ((line = br.readLine()) != null){
                    System.out.println(line);
                }

            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }
    }
}
